import { Controller, UseFilters, UseInterceptors, UsePipes, ValidationPipe, UseGuards } from '@nestjs/common';
import { ApiTags, ApiBearerAuth } from '@nestjs/swagger';
import { Crud, CrudController } from '@nestjsx/crud';
import { OperatingAssets } from 'libs/db/entity/operating-assets.entity';
import { HttpExceptionFilter } from '../_filter/http-exception.filter';
import { LoggingInterceptor } from '../_interceptor/logging.interceptor';
import { OperatingAssetsCrudOps } from './operating-assets-crud-ops';
import { OperatingAssetsService } from './operating-assets.service';
import { AuthGuard } from '@nestjs/passport';


@Crud(OperatingAssetsCrudOps)
@UseFilters(HttpExceptionFilter)
@UsePipes(ValidationPipe)
@UseInterceptors(LoggingInterceptor)
@UseGuards(AuthGuard('jwt-admin'))
@ApiBearerAuth()
@ApiTags('三资管理 - 资产 - 经营性资产信息')   //标签
@Controller('operating-assets')
export class OperatingAssetsController implements CrudController<OperatingAssets> {
  constructor(public service: OperatingAssetsService) {
  }
}
